package tasks;


import java.util.Scanner;

/**
 * https://wiki.amoscloud.com/zh/ProgramingPractice/NowCoder/Adecco/Topic0007
 */
public class Task007_02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] strArray = scanner.nextLine().split("\\s+");
        String[] inputArray = scanner.nextLine().split("\\s+");
        if (strArray == null || inputArray == null || inputArray.length != 2) {
            return;
        }
        int start = Integer.parseInt(inputArray[0]);
        int end = Integer.parseInt(inputArray[1]);

        int length = strArray.length;
        if (length < end) {
            end = length;
        }
        if (start < 0 || start > end) {
            return;
        }
        int left = start;
        int right = end;
        while (left<right) {
            String tempStr = strArray[left];
            strArray[left] = strArray[right];
            strArray[right] = tempStr;
            left++;
            right--;
        }
        for (String s : strArray) {
            System.out.print(s+ " ");
        }


    }
}
